import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './utils/poros';
import './utils/components.js';
import './utils/filters.js';
import './utils/http';
import './utils/error-handler.js';
import './styles/common.less';
import './styles/vuetify.css';
import SvgIcon from '@/components/svg-icon';
import './assets/css/common.less';
import * as echarts from 'echarts';

// 使用element-ui 的提示框
import { Message, MessageBox, Notification } from 'element-ui';
Vue.prototype.$message = Message;
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$prompt = MessageBox.prompt;
Vue.prototype.$notify = Notification;
Vue.prototype.$echarts = echarts;

Vue.prototype.$auth = key => {
  const btnAuth = store.state?.poros?.btnAuth || [];
  return btnAuth.includes(key);
};

Vue.config.productionTip = false;
Vue.config.devtools = true;
Vue.use(SvgIcon);

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app');
